#-*-Makefile-*- vim:syntax=make

NODEID = $(INSTALL)
BUILD_DEPS = delsetid

ifeq ($(BOOTLOADER),tosboot)
  BUILD_DEPS = delsetid_bl
endif

PROGRAMMER_NAME ?= $(TOSMAKE_PROGRAMMER_TYPE)

program: setid ${INSTALL_DEPS} FORCE
	@echo -e '$(INFO_STRING) installing $(PLATFORM) binary using $(PROGRAMMER_NAME)'
	$(PROGRAMMER) $(PROGRAMMER_FLAGS) $(PROGRAMMER_INSTALL_SREC_FLAGS)

program_bl: setid ${INSTALL_DEPS} FORCE
	@echo '$(INFO_STRING) installing $(PLATFORM) bootloader using $(PROGRAMMER_NAME)'
	$(PROGRAMMER) $(PROGRAMMER_FLAGS) $(PROGRAMMER_INSTALL_BOOTLOADER_FLAGS)
